public class Test {
    public static void main(String[] args) {
        int sum = 0;
        for(int i = 0;i <= 100;i++){
            int x = i;
            do {
              int ret = x % 10;
              if(ret == 9){
                  sum++;
              }
              x /= 10;
            }
            while(x>0);
        }
        System.out.println(sum);
    }
}
